package com.itheima.pattern.decorator;

public class Client {
    public static void main(String[] args) {
        FastFood food = new FriedRice();

        food = new Egg(food);
        System.out.println(food.getDesc()+"  "+food.cost());

        System.out.println("------------");

        food = new Egg(food);
        System.out.println(food.getDesc()+"  "+food.cost());
        System.out.println("-----------------");

        food = new Egg(food);
        System.out.println(food.getDesc()+"  "+food.cost());
        System.out.println("---------------------");
        food = new Bacon(food);
        System.out.println(food.getDesc()+"  "+food.cost());

        System.out.println("--------------------");
        FastFood food1 = new FriedNoodies();
        food1 = new Bacon(food1);
        System.out.println(food1.getDesc()+" "+food1.cost());


    }
}
